// File generated from our OpenAPI spec by Stainless.

package com.metest.api.services.blocking.rest.actuator

import com.google.errorprone.annotations.MustBeClosed
import com.metest.api.core.ClientOptions
import com.metest.api.core.RequestOptions
import com.metest.api.core.http.HttpResponse
import com.metest.api.core.http.HttpResponseFor
import com.metest.api.models.rest.actuator.loggers.LoggerListParams
import com.metest.api.models.rest.actuator.loggers.LoggerListResponse
import com.metest.api.models.rest.actuator.loggers.LoggerRetrieveParams
import com.metest.api.models.rest.actuator.loggers.LoggerRetrieveResponse
import com.metest.api.models.rest.actuator.loggers.LoggerUpdateParams
import java.util.function.Consumer

interface LoggerService {

    /**
     * Returns a view of this service that provides access to raw HTTP responses for each method.
     */
    fun withRawResponse(): WithRawResponse

    /**
     * Returns a view of this service with the given option modifications applied.
     *
     * The original service is not modified.
     */
    fun withOptions(modifier: Consumer<ClientOptions.Builder>): LoggerService

    /** Actuator web endpoint 'loggers-name' */
    fun retrieve(name: String): LoggerRetrieveResponse = retrieve(name, LoggerRetrieveParams.none())

    /** @see retrieve */
    fun retrieve(
        name: String,
        params: LoggerRetrieveParams = LoggerRetrieveParams.none(),
        requestOptions: RequestOptions = RequestOptions.none(),
    ): LoggerRetrieveResponse = retrieve(params.toBuilder().name(name).build(), requestOptions)

    /** @see retrieve */
    fun retrieve(
        name: String,
        params: LoggerRetrieveParams = LoggerRetrieveParams.none(),
    ): LoggerRetrieveResponse = retrieve(name, params, RequestOptions.none())

    /** @see retrieve */
    fun retrieve(
        params: LoggerRetrieveParams,
        requestOptions: RequestOptions = RequestOptions.none(),
    ): LoggerRetrieveResponse

    /** @see retrieve */
    fun retrieve(params: LoggerRetrieveParams): LoggerRetrieveResponse =
        retrieve(params, RequestOptions.none())

    /** @see retrieve */
    fun retrieve(name: String, requestOptions: RequestOptions): LoggerRetrieveResponse =
        retrieve(name, LoggerRetrieveParams.none(), requestOptions)

    /** Actuator web endpoint 'loggers-name' */
    fun update(name: String) = update(name, LoggerUpdateParams.none())

    /** @see update */
    fun update(
        name: String,
        params: LoggerUpdateParams = LoggerUpdateParams.none(),
        requestOptions: RequestOptions = RequestOptions.none(),
    ) = update(params.toBuilder().name(name).build(), requestOptions)

    /** @see update */
    fun update(name: String, params: LoggerUpdateParams = LoggerUpdateParams.none()) =
        update(name, params, RequestOptions.none())

    /** @see update */
    fun update(params: LoggerUpdateParams, requestOptions: RequestOptions = RequestOptions.none())

    /** @see update */
    fun update(params: LoggerUpdateParams) = update(params, RequestOptions.none())

    /** @see update */
    fun update(name: String, requestOptions: RequestOptions) =
        update(name, LoggerUpdateParams.none(), requestOptions)

    /** Actuator web endpoint 'loggers' */
    fun list(): LoggerListResponse = list(LoggerListParams.none())

    /** @see list */
    fun list(
        params: LoggerListParams = LoggerListParams.none(),
        requestOptions: RequestOptions = RequestOptions.none(),
    ): LoggerListResponse

    /** @see list */
    fun list(params: LoggerListParams = LoggerListParams.none()): LoggerListResponse =
        list(params, RequestOptions.none())

    /** @see list */
    fun list(requestOptions: RequestOptions): LoggerListResponse =
        list(LoggerListParams.none(), requestOptions)

    /** A view of [LoggerService] that provides access to raw HTTP responses for each method. */
    interface WithRawResponse {

        /**
         * Returns a view of this service with the given option modifications applied.
         *
         * The original service is not modified.
         */
        fun withOptions(modifier: Consumer<ClientOptions.Builder>): LoggerService.WithRawResponse

        /**
         * Returns a raw HTTP response for `get /rest/actuator/loggers/{name}`, but is otherwise the
         * same as [LoggerService.retrieve].
         */
        @MustBeClosed
        fun retrieve(name: String): HttpResponseFor<LoggerRetrieveResponse> =
            retrieve(name, LoggerRetrieveParams.none())

        /** @see retrieve */
        @MustBeClosed
        fun retrieve(
            name: String,
            params: LoggerRetrieveParams = LoggerRetrieveParams.none(),
            requestOptions: RequestOptions = RequestOptions.none(),
        ): HttpResponseFor<LoggerRetrieveResponse> =
            retrieve(params.toBuilder().name(name).build(), requestOptions)

        /** @see retrieve */
        @MustBeClosed
        fun retrieve(
            name: String,
            params: LoggerRetrieveParams = LoggerRetrieveParams.none(),
        ): HttpResponseFor<LoggerRetrieveResponse> = retrieve(name, params, RequestOptions.none())

        /** @see retrieve */
        @MustBeClosed
        fun retrieve(
            params: LoggerRetrieveParams,
            requestOptions: RequestOptions = RequestOptions.none(),
        ): HttpResponseFor<LoggerRetrieveResponse>

        /** @see retrieve */
        @MustBeClosed
        fun retrieve(params: LoggerRetrieveParams): HttpResponseFor<LoggerRetrieveResponse> =
            retrieve(params, RequestOptions.none())

        /** @see retrieve */
        @MustBeClosed
        fun retrieve(
            name: String,
            requestOptions: RequestOptions,
        ): HttpResponseFor<LoggerRetrieveResponse> =
            retrieve(name, LoggerRetrieveParams.none(), requestOptions)

        /**
         * Returns a raw HTTP response for `post /rest/actuator/loggers/{name}`, but is otherwise
         * the same as [LoggerService.update].
         */
        @MustBeClosed
        fun update(name: String): HttpResponse = update(name, LoggerUpdateParams.none())

        /** @see update */
        @MustBeClosed
        fun update(
            name: String,
            params: LoggerUpdateParams = LoggerUpdateParams.none(),
            requestOptions: RequestOptions = RequestOptions.none(),
        ): HttpResponse = update(params.toBuilder().name(name).build(), requestOptions)

        /** @see update */
        @MustBeClosed
        fun update(
            name: String,
            params: LoggerUpdateParams = LoggerUpdateParams.none(),
        ): HttpResponse = update(name, params, RequestOptions.none())

        /** @see update */
        @MustBeClosed
        fun update(
            params: LoggerUpdateParams,
            requestOptions: RequestOptions = RequestOptions.none(),
        ): HttpResponse

        /** @see update */
        @MustBeClosed
        fun update(params: LoggerUpdateParams): HttpResponse = update(params, RequestOptions.none())

        /** @see update */
        @MustBeClosed
        fun update(name: String, requestOptions: RequestOptions): HttpResponse =
            update(name, LoggerUpdateParams.none(), requestOptions)

        /**
         * Returns a raw HTTP response for `get /rest/actuator/loggers`, but is otherwise the same
         * as [LoggerService.list].
         */
        @MustBeClosed
        fun list(): HttpResponseFor<LoggerListResponse> = list(LoggerListParams.none())

        /** @see list */
        @MustBeClosed
        fun list(
            params: LoggerListParams = LoggerListParams.none(),
            requestOptions: RequestOptions = RequestOptions.none(),
        ): HttpResponseFor<LoggerListResponse>

        /** @see list */
        @MustBeClosed
        fun list(
            params: LoggerListParams = LoggerListParams.none()
        ): HttpResponseFor<LoggerListResponse> = list(params, RequestOptions.none())

        /** @see list */
        @MustBeClosed
        fun list(requestOptions: RequestOptions): HttpResponseFor<LoggerListResponse> =
            list(LoggerListParams.none(), requestOptions)
    }
}
